<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="shortcut icon" href="images/logo W.jpg" />
        <title>Work to Worker</title>
        <style>
            a:link {text-decoration:none;} 
        </style>
        <style type="text/css">
            @font-face {
                font-family: "jokerman";
                src: url('font/VIVALDII.TTF') format("truetype");
            }   
            @media screen and (-webkit-min-device-pixel-ratio:0)
            {
                #fix1 { margin-top: 0px }
                #pass{margin-top: 28px}
                #confirm{margin-top: 26px}
                #phone{margin-top: 24px}
            }
            @-moz-document url-prefix()
            {
                #fix1 { margin-top: -20px }
            #pass{margin-top: 22px}
            #confirm{margin-top: 22px}
            #phone{margin-top: 20px}
            }
        </style>
    </h:head>
    <h:body style="background-color:  #1A3665">
        <f:view locale="#{languageBean.locale}">

            <div style="width: 1000px;margin: auto;margin-top: 20px;background-color: white;border-radius: 10px;-moz-border-radius: 10px">
                <ui:include src="headertemplate1.xhtml" />
                <h:form style=" font-size: 90% !important; " id="form1">
                    <div>
                        <div style="background-color: #9CDBEF;color: black;margin-top: 30px;font-size: 20px;font-weight: bold;padding-left: 50px">
                            Sign Up
                        </div >
                        <div style="background-color: #E9E9E9;color: black;font-size: 20px;font-weight: bold;padding-left: 80px">
                            Account Infomation
                        </div>

                        <div>
                            <ul style="margin-left: 80px">
                                <li style="display: inline-block;vertical-align: top;text-align: right;width: 200px;font-weight: bold;">
                                    <ul id="username">
                                        <li style="list-style: none;">User name :<font style="color: red"> *</font></li>

                                    </ul>
                                    <ul id="pass">
                                        <li style="list-style: none;">Password :<font style="color: red"> *</font></li>

                                    </ul>
                                    <ul id="confirm">
                                        <li style="list-style: none;">Confirm password :<font style="color: red"> *</font></li>

                                    </ul>
                                </li>
                                <li style="display: inline-block;vertical-align: top">
                                    <ul style="margin-left: -15px"> 
                                        <li style="display: inline"><h:inputText value="#{customerSignUp.acc.useName}" id="useName" required="true" requiredMessage="* Username is required" /> </li>
                                        <li style="display: inline"><h:message for="useName" style="color: red"/></li>
                                    </ul>
                                    <ul style="margin-top: 18px;margin-left: -15px">
                                        <li style="display: inline">
                                            <h:inputSecret value="#{customerSignUp.acc.password}" id="pass" required="true" requiredMessage="* Password is required">
                                                <f:validator validatorId="passwordValidator" />
                                                <f:attribute name="confirmPassword" value="#{confirmPassword}" />
                                            </h:inputSecret> 
                                        </li>
                                        <li style="display: inline"><h:message for="pass" style="color: red"/></li> 
                                    </ul>
                                    <ul style="margin-top: 18px;margin-left: -15px">
                                        <li style="display: inline;"><h:inputSecret value="#{customerSignUp.confirmPass}" id="confirmPassword" required="true" binding="#{confirmPassword}" requiredMessage="* Confirm Password is required"/> </li>
                                        <li style="display: inline"><h:message for="confirmPassword" style="color: red"/></li>
                                    </ul>
                                </li>
                                <li style="display: inline-block;margin-left: 60px">
                                    <img src="images/PhotoShare.png" width="100" height="120" alt="PhotoShare"/>
                                </li>
                            </ul>
                        </div>
                        <div style="background-color: #E9E9E9;color: black;font-size: 20px;font-weight: bold;padding-left: 80px">
                            Customer Infomation
                        </div>
                        <div style="margin-left: 20px">
                            <ul>
                                <li style="display: inline-block;vertical-align: top;text-align: right;width: 260px;font-weight: bold;">
                                    <ul>
                                        <li style="list-style: none;">Business name :<font style="color: red"> *</font></li>                                    
                                        <li style="list-style: none;" id="confirm">Address :<font style="color: red"> *</font></li>
                                        <li style="list-style: none;" id="phone">Phone :<font style="color: red"> *</font></li>
                                        <li style="list-style: none;" id="phone">Description of your business :<font style="color: red"> *</font></li>
                                    </ul>
                                </li>
                                <li style="display: inline-block;vertical-align: top;margin-left: -15px;">    
                                    <ul>
                                        <li style="display: inline"><h:inputText value="#{customerSignUp.cus.name}" id="cusname" required="true" requiredMessage="* Business name is required"/> </li>   
                                        <li style="display: inline"><h:message for="cusname" style="color: red"/></li>
                                    </ul>
                                    <ul style="margin-top: 18px">
                                        <li style="display: inline"><h:inputText value="#{customerSignUp.cus.address}" id="cusaddress" required="true" requiredMessage="* Address is required"/></li>
                                        <li style="display: inline"><h:message for="cusaddress" style="color: red"/></li>
                                    </ul>
                                    <ul style="margin-top: 15px">
                                        <li style="display: inline">
                                            <h:inputText value="#{customerSignUp.cus.phone}" id="cusphone" required="true" requiredMessage="* Phone is required" validatorMessage="* Phone is not valid">
                                                <f:validateRegex pattern="^09[0-9]{8}||^01[0-9]{9}"  />
                                            </h:inputText> 
                                        </li>
                                        <li style="display: inline"><h:message for="cusphone" style="color: red"/></li>
                                    </ul>
                                    <ul style="margin-top: 20px">
                                        <li style="display: inline;"><p:editor value="#{customerSignUp.cus.description}" id="cusdes" required="true" requiredMessage="* Description is required"/> </li>
                                        <li style="display: inline"><h:message for="cusdes" style="color: red"/></li>
                                    </ul>
                                </li>
                            </ul>
                            <ul style="margin-top: 20px;margin-left: 40px">
                                <li style="display: inline;margin-left: 140px"><h:commandButton value="Submit" type="submit" action="#{customerSignUp.insertCustomerSignUp()}" style="border-style: none;font-weight: bold;background-color: #1A3665;color: white;height: 30px;width:100px;cursor: pointer" /></li>
                                <li style="display: inline;margin-left: 30px"><h:commandButton type="reset" value="Reset" style="border-style: none;font-weight: bold;background-color: #1A3665;color: white;height: 30px;width:100px;cursor: pointer" /></li>
                            </ul>
                        </div>                
                    </div>
                    <br/>
                    <br/>
                </h:form>
            </div>
            <div style="color: white; height: 100px;border-radius: 10px;-moz-border-radius: 10px;border: 1px;border-style: solid;border-color: white;margin-top: 20px">
                <div style="text-align: right; padding-top: 20px;padding-right: 30px">
                    Copyright © by Group 1
                    <br />
                    Project Name : Work to Worker
                    <br />
                    Member in Group : Mr Bùi Hồng Hải , Mr Nguyễn Văn Cường , Mr Nguyễn Nhất Linh , Mr Lưu Thế Thông , Mr Trần Trung Hiếu
                </div>
            </div>

        </f:view>
    </h:body>
</html>

